﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page.aspx.cs" Inherits="WebApplication6._14.Page" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            姓名：<asp:TextBox ID="Name" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="姓名不能为空！" ControlToValidate="Name" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="姓名不能为admin" ControlToValidate="Name" Display="Dynamic" ForeColor="Red" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>

            <br />
            密码：<asp:TextBox ID="Password" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="密码不能为空！" ControlToValidate="Password" ForeColor="Red"></asp:RequiredFieldValidator>

            <br />
            再次输入密码：<asp:TextBox ID="ConfirmPassword" runat="server" ForeColor="Black"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次输入的密码不一致！" ControlToCompare="Password" ControlToValidate="ConfirmPassword" ForeColor="Red"></asp:CompareValidator>

            <br />
            年龄：<asp:TextBox ID="Age" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="年龄范围必须在0~100之间" ControlToValidate="Age" Type="Integer" MaximumValue="100" MinimumValue="0" ForeColor="Red"></asp:RangeValidator>

            <br />
            出生日期：<asp:TextBox ID="Birth" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="出生日期超出1900-01-01到系统当前时间的范围" ControlToValidate="Birth" ForeColor="Red" MinimumValue="1900-01-01" Type="Date" Display="Dynamic"></asp:RangeValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="日期格式必须为：1900-01-01" ControlToValidate="Birth" Display="Dynamic" ValidationExpression="\d{4}-\d{2}-\d{2}" ForeColor="Red" ></asp:RegularExpressionValidator>

            <br />
            毕业时间：<asp:TextBox ID="GraduateTime" runat="server"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator2" runat="server" ErrorMessage="娘胎毕业？毕业时间不能早于或等于出生时间！" ControlToCompare="Birth" ControlToValidate="GraduateTime" Type="Date" Operator="GreaterThan" ForeColor="Red"></asp:CompareValidator>

            <br />
            邮箱格式：<asp:TextBox ID="Email" runat="server"></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="格式错误！" ControlToValidate="Email" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>

            <br />
            头像：<asp:FileUpload ID="Picture" runat="server" />
            <asp:Literal ID="error" runat="server"></asp:Literal>
            <br />
            <asp:Image ID="LookOver" runat="server" />

            <br />
            <asp:Button ID="Submit" runat="server" Text="提交" OnClick="Submit_Click" />
            <br />
            <asp:Label ID="Jump" runat="server" ></asp:Label>
            <br />
            <asp:ValidationSummary ID="ValidationSummary1" runat="server"  ShowMessageBox="true"/>
            
        </div>
    </form>
</body>
</html>
